import React from 'react';
import Page from './layout/page/index'
import { Route, Redirect } from 'react-router-dom'
//import { secroutes } from './routers/router'
import { ConfigProvider } from 'antd';
import zhCN from 'antd/lib/locale/zh_CN';
import moment from 'moment';
import 'moment/locale/zh-cn';
moment.locale('zh-cn');
function App() {
    return (
        
        <ConfigProvider locale={zhCN}>
            {(localStorage.getItem('token')?
            <div className="App">
                <Page key='zh-cn'>
                   {/*
                    {secroutes.map(item => {
                        return <Route key={item.path} path={item.path} component={item.component} />
                    })}
                */}
                </Page>
            </div>:<Redirect to={'/login'} />
            )}
            </ConfigProvider>
    )
}
export default App